import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/style/index.less'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import components  from './components'
import dayjs from 'dayjs';
import AMapLoader from '@amap/amap-jsapi-loader'
import Notifications from "vue-notification"
import axios from 'axios'

import * as echarts from 'echarts'
import EChartsPlugin from '../src/plugins/EChartsConfig' 
import VScaleScreen from 'v-scale-screen'


Vue.prototype.$axios = axios

Vue.config.productionTip = false
Vue.use(Notifications)
Vue.use(ElementUI);
Vue.use(components)
Vue.use(EChartsPlugin)
Vue.use(VScaleScreen)

Vue.prototype.$dayjs = dayjs
Vue.prototype.$AMapLoader = AMapLoader
Vue.prototype.$echarts = echarts

new Vue({
  router,
  store,
  created() {
    // 初始化 Store 状态
    this.$store.dispatch('initializeStore');
  },
  render: h => h(App)
}).$mount('#app')
